<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Update Topic</title>
    <link rel="stylesheet" type="text/css" href="<c:url value="/CSS/topic/topic.css"/>"/> 
  </head>
  <body>
    <div class="container">
      <form action="<c:url value="/topic/updateTopic-${topic.topicId}"/>" method="post">
        <div class="title">Update Topic</div>
          <c:if test="${!empty message}">
            <div class="red">${message}</div>
          </c:if>
        <div class="group">
          <div class="label">Topic Name:</div>
          <div class="field"><input type="text" name="title" value="${topic.title}"/></div>
        </div>
        <div class="group">
          <div class="label">Topic Content:</div>
          <div class="field"><textarea name="content">${topic.content}</textarea></div>
        </div>
        <div class="buttons">
          <input type="submit" value="Update"/>&nbsp;
          <input type="button" value="Close" onclick="javascript:closeWindow();"/>
        </div>
      </form>
    </div>
    <script type="text/javascript" src="<c:url value="/JS/jcommon.js"/>"></script>
  </body>
</html>